package com.fowo.api.model.supplier.flow.node;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ContentStyle;
import com.alibaba.excel.enums.poi.HorizontalAlignmentEnum;
import javax.validation.constraints.*;
import lombok.Getter;
import lombok.Setter;

/** 供应商流程节点 导入导出辅助模型 */
@Getter
@Setter
public class SupplierFlowNodeExcelPo {

  @Size(max = 128, message = "流程编码长度不能超过20")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "流程编码")
  private String enCode;

  @NotBlank(message = "节点类型不能为空")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "*节点类型")
  private String type;

  @NotBlank(message = "当前节点不能为空")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "*当前节点")
  private String nodeUp;

  @NotBlank(message = "目标节点不能为空")
  @Size(max = 50, message = "目标节点长度不能超过20")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "*目标节点")
  private String node;

  @NotBlank(message = "异常节点不能为空")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "*异常节点")
  private String nodeExceptionStatus;

  @NotBlank(message = "异常下游节点不能为空")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "*异常下游节点")
  private String nodeDownExceptionStatus;

  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "任务拾取人")
  private String toUserField;

  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "任务待转发人")
  private String forwardUserField;

  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "候选人")
  private String nodeDoUserName;

  @ExcelIgnore
  @ExcelProperty(value = "候选人")
  private Long nodeDoUser;

  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "候选角色")
  private String nodeDoRoleRoleName;

  @ExcelIgnore
  @ExcelProperty(value = "候选角色")
  private Long nodeDoRole;

  @NotNull(message = "顺序不能为空")
  @ExcelProperty(value = "*顺序")
  private Integer nodeSort;
}
